package com.liu.project.service.impl;

import com.liu.project.dao.LogMapper;
import com.liu.project.pojo.Log;
import com.liu.project.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.awt.peer.LightweightPeer;
import java.util.List;

/**
 * @program: project
 * @description: 用户日志操作
 * @author: 86187
 * @create: 2022-03-13 15:55
 **/

@Service
public class LogServiceImpl implements LogService {

   @Autowired
    LogMapper logMapper;


    @Override
    public boolean addLog(Log log) {
        int i = logMapper.addLog(log);
        return i>0;
    }

    @Override
    public boolean deleteLog(int id) {
            int i = logMapper.deleteLog(id);
        return i>0;
    }

    @Override
    public List<Log> getLogs(int userId) {
        List<Log> logs = logMapper.getLogs(userId);
        return logs;
    }
}

